﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="材料收发存统计.aspx.cs" Inherits="syc.Store.材料收发存统计" %>
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript" language="javascript" src="/common.js"></script>

    <form id="form1" runat="server">
    <div id="wintop" class="wintop">材料到货记录</div>
    <asp:Panel ID="Panel1" runat="server" CssClass="toolbarpanel">

    <table border="0" cellpadding="0" style="border-collapse: collapse;">
	    <tr>
	        <td height="36" valign="bottom" style="padding-left:10px;">
	            <asp:Button ID="Button_Sheet_Arrival" runat="server" Text="到货统计" 
                    UseSubmitBehavior="false" CssClass="topsheet" 
                    onclick="Button_Sheet_Arrival_Click" /><asp:Button ID="Button_Sheet_In" runat="server" Text="入库统计" 
                    UseSubmitBehavior="false" CssClass="normalsheet" 
                    onclick="Button_Sheet_In_Click" /><asp:Button ID="Button_Sheet_Out" 
                    runat="server" Text="出库统计" UseSubmitBehavior="false" 
                    CssClass="normalsheet" onclick="Button_Sheet_Out_Click"  /><asp:Button ID="Button_Sheet_Store" 
                    runat="server" Text="库存统计" UseSubmitBehavior="false" 
                    CssClass="normalsheet" onclick="Button_Sheet_Store_Click" />
            </td>
		    <td align="left" style="padding-left:40px;">

		    </td>
	    </tr>
    </table>
    </asp:Panel>
         
    <asp:Panel ID="Panel2" runat="server" CssClass="panel">
       <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
        SelectCommand="SELECT [ID], [品名] +'('+ [规格] +')' as 材料类别 FROM [材料]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
        SelectCommand="SELECT [ID], [名称] FROM [材料供货单位] union select 0 as [ID],'全部' as [名称]"></asp:SqlDataSource>
        
        <span style="display:inline-block;width:220px;">材料类别：<asp:DropDownList 
            ID="CaiLiao" runat="server" DataSourceID="SqlDataSource2" Width="120px"
            DataTextField="材料类别" DataValueField="ID"></asp:DropDownList></span>
        <span style="display:inline-block;width:220px;">供货单位：<asp:DropDownList 
            ID="GongHuo" runat="server" DataSourceID="SqlDataSource3"  Width="120px"
            DataTextField="名称" DataValueField="ID"></asp:DropDownList></span>
        <br />

         入库日期：<asp:TextBox ID="Date1" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date1').value, document.getElementById('Date1'));" />
 
        <span style="display:inline-block;text-align:center;width:83px;">
            至 
        </span>
        <span style="display:inline-block;width:160px;">
            <asp:TextBox ID="Date2" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date2').value, document.getElementById('Date2'));" />            
        </span>
        <asp:Button ID="Button_Stat1" runat="server" Text="" UseSubmitBehavior="false" 
            CssClass="common_botton_统计" onclick="Button_Stat1_Click" />
       <asp:Panel ID="Panel5" runat="server" CssClass="panel">
        <asp:Label ID="Label_Result1" runat="server" Text="请点击“统计”按钮进行统计" ForeColor="Red" Font-Size="15px"></asp:Label>
        </asp:Panel>
    </asp:Panel>
    
<asp:Panel ID="Panel3" runat="server" CssClass="panel" Visible="false">

        <span style="display:inline-block;width:220px;">材料类别：<asp:DropDownList 
            ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" Width="120px"
            DataTextField="材料类别" DataValueField="ID"></asp:DropDownList></span>
        <span style="display:inline-block;width:220px;">使用单位：<asp:DropDownList ID="ShiYongDanWei" runat="server" Width="140px">
                <asp:ListItem Value="1">一分厂</asp:ListItem>
                <asp:ListItem Value="2">二分厂</asp:ListItem>
                <asp:ListItem Value="3">三分厂</asp:ListItem>
                <asp:ListItem Value="4">四分厂</asp:ListItem>
                <asp:ListItem Value="5">五分厂</asp:ListItem>
            </asp:DropDownList></span>
        <br />

         出库日期：<asp:TextBox ID="TextBox1" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date1').value, document.getElementById('Date1'));" />
 
        <span style="display:inline-block;text-align:center;width:83px;">
            至 
        </span>
        <span style="display:inline-block;width:160px;">
            <asp:TextBox ID="TextBox2" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date2').value, document.getElementById('Date2'));" />            
        </span>
        <asp:Button ID="Button_Stat2" runat="server" Text="" UseSubmitBehavior="false" 
            CssClass="common_botton_统计" />
       <asp:Panel ID="Panel6" runat="server" CssClass="panel">
        <asp:Label ID="Label_Result2" runat="server" Text="请点击“统计”按钮进行统计" ForeColor="Red" Font-Size="15px"></asp:Label>
        </asp:Panel>
    </asp:Panel>

<asp:Panel ID="Panel4" runat="server" CssClass="panel" Visible="false">
        <span style="display:inline-block;width:220px;">材料类别：<asp:DropDownList 
            ID="DropDownList3" runat="server" DataSourceID="SqlDataSource2" Width="120px"
            DataTextField="材料类别" DataValueField="ID"></asp:DropDownList></span>
        <span style="display:inline-block;width:220px;">供货单位：<asp:DropDownList 
            ID="DropDownList4" runat="server" DataSourceID="SqlDataSource3"  Width="120px"
            DataTextField="名称" DataValueField="ID"></asp:DropDownList></span>
        <br />

         入库日期：<asp:TextBox ID="TextBox3" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date1').value, document.getElementById('Date1'));" />
 
        <span style="display:inline-block;text-align:center;width:83px;">
            至 
        </span>
        <span style="display:inline-block;width:160px;">
            <asp:TextBox ID="TextBox4" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date2').value, document.getElementById('Date2'));" />            
        </span>
        <asp:Button ID="Button_Stat3" runat="server" Text="" UseSubmitBehavior="false" 
            CssClass="common_botton_统计" />
       <asp:Panel ID="Panel7" runat="server" CssClass="panel">
        <asp:Label ID="Label_Result3" runat="server" Text="请点击“统计”按钮进行统计" ForeColor="Red" Font-Size="15px"></asp:Label>
        </asp:Panel>
    </asp:Panel>
    </form>
<script>
    var textboxs = document.getElementsByTagName("input");
    var i;
    for (i = 0; i < textboxs.length; i++) {
        if (textboxs[i].className == "textbox") {
            textboxs[i].onchange = function(e) { this.className = "textbox-changed"; };
            textboxs[i].onfocus = function(e) { this.select(); };
        }
        else if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
            textboxs[i].onfocus = function(e) { this.select(); };
        }
    }
    var rows = document.getElementsByTagName("tr");
    for (i = 0; i < rows.length; i++) {

        if (rows[i].className == "grid-row-normal") {
            rows[i].onmouseover = function() { this.className = "grid-row-bright"; };
            rows[i].onmouseout = function() { this.className = "grid-row-normal"; };
            rows[i].onclick = function() { this.firstChild.firstChild.click(); };
        }
    }
    var tds = document.getElementsByTagName("td");
    for (i = 0; i < tds.length; i++) {
        if (tds[i].className == "detailheader") {
            tds[i].innerHTML = tds[i].innerHTML.replace("*", "<span class=required>*</span>");
        }
    }

    buttonInit();
    
</script>
</body>
</html>
